1. Field of the Invention
The present invention relates generally to a data communication, and more particularly to an apparatus and method for serial data communication which can transmit and receive serial data of an inter intergrated circuit (IIC or I.sup.2 C) type utilizing a general microcomputer.
2. Description of the Related Art
In a conventional apparatus for serial data communication, serial data is transmitted and received using a hardware for I.sup.2 C serial communication built in a microcomputer which is a system controller.
FIG. 1A illustrates the construction, of a microcomputer having a built-in I.sup.2 C hardware. Referring to FIG. 1A, the I.sup.2 C serial communication type data is transmitted or received under the control of the microcomputer 1. Specifically, as shown in FIGS. 2A and 2B, a starting condition for receiving serial data SDA with a serial clock signal SLC, which are externally, received, is detected by the I.sup.2 C hardware 1A built in the microcomputer 1.
The received data is temporarily stored byte by byte in a data register IICDR, the construction of which is illustrated in FIG. 1B, being synchronized with the serial clock signal SCL, and then stored in a RAM (random access memory) built in the microcomputer 1.
As a result, the received data is stored byte by byte in the RAM through the data register IICDR to perform the reception of the serial data. Thereafter, if a stop condition is received as shown in FIGS. 2A and 2B, the data reception is thereby terminated.
Meanwhile, in case of data transmission, data to be transmitted is temporarily stored in the data register IICDR, and then transmitted byte by byte after the start condition is generated as shown in FIGS. 2A and 2B. If final data has been transmitted as the data transmission is progressing, the stop condition is generated as shown in FIGS. 2A and 2B to terminate the data transmission. FIG. 3 is an algorithm diagram incorporating the I.sup.2 C serial communication type data transmission/reception process utilizing the microcomputer having the built-in I.sup.2 C hardware.
As described above, the conventional communication apparatus should employ the I.sup.2 C hardware built in the microcomputer to achieve the I.sup.2 C serial communication. Otherwise, the I.sup.2 C type serial data transmission/reception will be impossible.